﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using DAL;
using DTO;

namespace BUS
{
    public class BizNhanHieu
    {
        //Get All information in table mp_NhanHieu
        public static List<NhanHieuDto> mp_NhanHieu_GetAll()
        {
            return DaNhanHieu.GetAllNhanHieu();
        }
        //Get One product by Id in table mp_SanPham
        public static List<NhanHieuDto> mp_NhanHieu_GetOneNhanHieuByID(NhanHieuDto nhanHieuDto)
        {
            return DaNhanHieu.GetOneNhanHieuByID(nhanHieuDto);
        }

        //Insert or Update table mp_NhanHieu...........
        public static string mp_NhanHieu_InsertUpdate(NhanHieuDto nhanHieuDto)
        {
            return DaNhanHieu.mp_NhanHieu_InsertUp(nhanHieuDto);
        }
        //Delete one product in table mp_SanPham
        public static void mp_NhanHieu_Delete(NhanHieuDto nhanHieuDto, bool isPermanent)
        {
            DaNhanHieu.mp_NhanHieu_Del(nhanHieuDto, isPermanent);
        }
    }
    public class NhanHieuDtoComparer : IEqualityComparer<NhanHieuDto>
    {
        #region IEqualityComparer<NhanHieu> Members

        public bool Equals(NhanHieuDto x, NhanHieuDto y)
        {
            return (x.IDNhanHieu == y.IDNhanHieu);
        }

        public int GetHashCode(NhanHieuDto obj)
        {
            return obj.GetHashCode();
        }

        #endregion
    }
}
